import request from "/@/utils/request"

export const getShiftTime = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForTH/getShiftTime',
        method: 'get',
        params,
    });
};

/**
 * JC单线别历史数据
 */
export const getJcHistoryData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForJc/getJcHistoryData',
        method: 'get',
        params,
    });
};

/**
 * 获取挤出真实数据
 * @param data
 * @returns {*}
 */
export const getJcRealTimeData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForJc/getJcRealTimeData',
        method: 'get',
        params,
    });
};

/**
 * 获取挤出模块汇总数据 3个数据
 * @param data
 * @returns {*|Promise<AxiosResponse<any>>}
 */
export const getJcSumData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForJc/getJcSumData',
        method: 'get',
        params,
    });
}

export const getJcTabulateData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForJc/getJcTabulateData',
        method: 'get',
        params,
    });
}


export const dicItemByCode = (obj?: Object) => {
    return request({
        url: '/wms/getValueSet/GetDicItemByCodeNoToken',
        method: 'post',
        data: obj
    });
}

export const sameDayProductionLineCode = (params?: Object) => {
    return request({
        url: '/eletile-mes/mesProduceRecord/getSameDayProductionLineCode',
        method: 'get',
        params,
    });
}


export const paperDocumentInspector = (obj?: Object) => {
    return request({
        url: '/wms/getValueSet/GetDicItemByCodeNoToken',
        method: 'post',
        data: obj
    });
}

export const getProcessLineById = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForTH/getPageSet',
        method: 'get',
        params,
    });
}

/**
 * 养生区线别历史数据
 */
export const getYSQProcessHistoryData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForYSQ/getYSQProcessHistoryData',
        method: 'get',
        params,
    });
}

export const getYSQProcessRealtimeData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForYSQ/getYSQProcessRealtimeData',
        method: 'get',
        params,
    });
}

export const getYSQRgvRealtimeData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForYSQ/getYSQRgvRealtimeData',
        method: 'get',
        params,
    });
}

export const getYSQTabulateData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForYSQ/getYSQTabulateData',
        method: 'get',
        params,
    });
}

/**
 * 查询产线当前模式
 */
export const getProductionLineMode = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForTH/getProductionLineMode',
        method: 'get',
        params,
    });
}


/**
 * 获取贴合历史数据
 */
export const getTHProcessHistoryData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForTH/getTHProcessHistoryData',
        method: 'get',
        params,
    });
}
/**
 * TH工序产出实时数据
 */
export const getTHProcessRealtimeData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForTH/getTHProcessRealtimeData',
        method: 'get',
        params,
    });
}

/**
 * TH两条线或单线别汇总数据
 */
export const getTHTabulateData = (params?: Object) => {
    return request({
        url: '/eletile-mes/ProductionStatusForTH/getTHTabulateData',
        method: 'get',
        params,
    });
}
